<template>
  <div class="topic_con_scroll"> 
      <div class="topic_item" v-for="(v, i) in readSpanStemlist" :key="i"> 
        <div class="topic_item_t">{{ i + 1 }}/ 1</div>
        <div class="topic_item_p" v-if="!v.content">空</div>
        <div v-else class="topic_item_p" v-html="v.content"></div> 
    </div>

    <!-- <div class="topic_item" v-for="(v, i) in 2" :key="i">
      <div class="topic_item_t">{{ i + 1 }}/ 1</div> 
      <div class="topic_item_p" v-if="!v.content">空</div>
      <div v-else class="topic_item_p" v-html="v.content"></div> 
    </div>  -->
    <!-- 去答题 -->
    <div class="go_answer" @click="goAnswer">去答题</div>
  </div>
</template>

<script>
export default {
  name: "readingguidance",
  props: {
    readSpanStemlist: Array,
    default: () => [],
 
  },
  data() {
    return {};
  },
  mounted() {},

  watch: {},
  methods: {
    goAnswer(){
      this.$store.commit('changeTestType','problem')
    }
  },
};
</script>
<style lang="less" scoped>
.topic_con_scroll {
  overflow-y: scroll;
  height: 100%;
  //火狐浏览器隐藏滚动条
  & {
    scrollbar-color: #9eb0e6 transparent;
    scrollbar-width: thin;
    scrollbar-track-color: transparent;
    -ms-scrollbar-track-color: transparent;
  }

  /* 设置滚动条的样式 谷歌  */

  &::-webkit-scrollbar {
    width: 12px;
  }

  /* 滚动槽 */

  &::-webkit-scrollbar-track {
    -webkit-box-shadow: inset006pxrgba(223, 224, 229);
    border-radius: 10px;
  }

  /* 滚动条滑块 */

  &::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: rgba(158, 176, 230);
    -webkit-box-shadow: inset006pxrgba(158, 176, 230);
  }

  &::-webkit-scrollbar-thumb:window-inactive {
    background: rgba(229, 226, 217);
  }

  .topic_item {
    .topic_item_t {
      margin-top: 0.5rem;
      width: 0.7rem;
      height: 0.3rem;
      line-height: 0.3rem;
      text-align: center;
      background: #dce6ff;
      border-radius: 6px 18px 18px 18px;
    }

    .topic_item_p {
      padding-left: 0.6rem;
      font-size: 0.21rem;
      line-height: 0.64rem;
      color: #373737;
    }
  }

  .go_answer {
    float: right;
    margin-top: 0.9rem;
    width: 1.42rem;
    height: 0.65rem;
    line-height: 0.65rem;
    text-align: center;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    background: url("../../assets/image/lesson/goanswer.png") no-repeat;
    background-size: 100% 100%;
  }
}
</style>
